home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD World 1998 January
/
CD World - Ocak 1998.iso
/
misc
/
dbase55
/
disk6
/
samples1.pak
/
CUSTORD.POP
< prev
next >
Wrap
Text File
|
1996-01-05
|
5KB
|
164 lines
******************************************************************************
* PROGRAM: Custord.pop
*
* WRITTEN BY: Borland Samples Group
*
* DATE: 5/95
*
* UPDATED: 5/95
*
* REVISION: $Revision: 1.2 $
*
* VERSION: Visual dBASE
*
* DESCRIPTION: This popup file is used by Custord.wfm for performing simple
* tasks when the right mouse button is clicked in the Custord
* form. It can switch from edit to view mode, and also perform
* clipboard operations on the currently active form control.
*
* PARAMETERS: FormObj -- the form to which this menu is attached.
*
* CALLS: None
*
* USAGE: set procedure to Custord.pop additive
* form.popupMenu = new CustordPopup(form, "CustordPopup")
*
*******************************************************************************
#include <Messdlg.h>
** END HEADER -- do not remove this line*
* Generated on 05/09/95
*
Parameter FormObj,PopupName
NEW CUSTORDPOPUP(FormObj,PopupName)
CLASS CUSTORDPOPUP(FormObj,PopupName) OF POPUP(FormObj,PopupName)
this.TrackRight = .T.
this.Alignment = 1
this.Top = 0
this.Left = 0
this.OnInitMenu = CLASS::ONINITMENU
DEFINE MENU VIEWEDIT OF THIS;
PROPERTY;
Text "&Edit",;
OnClick CLASS::VIEWEDITONCLICK,;
Shortcut "Ctrl-E"
DEFINE MENU SEPARATOR1 OF THIS;
PROPERTY;
Text "",;
Separator .T.
DEFINE MENU UNDO OF THIS;
PROPERTY;
Text "&Undo",;
Shortcut "Ctrl+Z",;
OnClick CLASS::UNDO_ONCLICK
DEFINE MENU CUT OF THIS;
PROPERTY;
Text "Cu&t",;
Shortcut "Ctrl+X",;
OnClick CLASS::CUT_ONCLICK
DEFINE MENU COPY OF THIS;
PROPERTY;
Text "&Copy",;
Shortcut "Ctrl+C",;
OnClick CLASS::COPY_ONCLICK
DEFINE MENU PASTE OF THIS;
PROPERTY;
Text "&Paste",;
Shortcut "Ctrl+V",;
OnClick CLASS::PASTE_ONCLICK
****************************************************************************
procedure OnInitMenu
* Enable submenus if the current control is a BROWSE/ENTRYFIELD/EDITOR.
****************************************************************************
private bEditControl
bEditControl = form.activeControl.className $ "BROWSE, ENTRYFIELD, EDITOR";
.and. form.curPage.inEditMode
this.Undo.enabled = bEditControl
this.Cut.enabled = bEditControl
this.Copy.enabled = bEditControl
this.Paste.enabled = bEditControl
****************************************************************************
procedure ViewEditOnClick
* Toggle between View and Edit modes.
****************************************************************************
form.ViewEdit()
****************************************************************************
Procedure UNDO_OnClick
* Execute Undo() operation if it is a method of the currently active control.
****************************************************************************
private control
control = form.activeControl
if control.className $ "BROWSE, ENTRYFIELD, EDITOR"
control.Undo()
endif
****************************************************************************
Procedure CUT_OnClick
* Execute Cut() operation if it is a method of the currently active control.
****************************************************************************
private control
control = form.activeControl
if control.className $ "BROWSE, ENTRYFIELD, EDITOR"
control.Cut()
endif
****************************************************************************
Procedure COPY_OnClick
* Execute Copy() operation if it is a method of the currently active control.
****************************************************************************
private control
control = form.activeControl
if control.className $ "BROWSE, ENTRYFIELD, EDITOR"
control.Copy()
endif
****************************************************************************
Procedure PASTE_OnClick
* Execute Paste() operation if it is a method of currently active control.
****************************************************************************
private control
control = form.activeControl
if control.className $ "BROWSE, ENTRYFIELD, EDITOR"
control.Paste()
endif
ENDCLASS